<?php
/**
 * Created by PhpStorm.
 * User: lixiaoyao
 * Date: 2017/4/7
 * Time: 15:40
 */
class PinkRole extends AdminBase{

    protected $do;

    function __construct(){
        parent::__construct();
        $this->do = 'roleManage';
        $this->{$this->op}();
    }

    function indexAction(){
        include_once template("admin_v2/role");
        exit();
    }

    function listAction(){
        $this->fetchData(array_merge([
            'do'     => $this->do,
            'format' => 'json',
            'operate' => 'list',
        ], $this->req));
    }

    function findAction(){
        $this->fetchData([
            'do'     => $this->do,
            'format' => 'json',
            'operate' => 'find',
            'uid' => $this->req['uid']
        ]);
    }

    function deleteAction(){
        $this->fetchData([
            'do'     => $this->do,
            'format' => 'json',
            'operate'=> 'delete',
            'id' => $this->req['id'],
            'uid' => $this->req['uid'],
            'uuid' => $this->req['uuid'],
        ]);
    }
}

new PinkRole;